#import <UIKit/UIKit.h>


#define SUPPORTS_UNDOCUMENTED_API 0

@interface UIColor (UIColor_Expanded)
@property (nonatomic, readonly) CGColorSpaceModel colorSpaceModel;
@property (nonatomic, readonly) BOOL canProvideRGBComponents;
@property (nonatomic, readonly) CGFloat red; // Only valid if canProvideRGBComponents is YES
@property (nonatomic, readonly) CGFloat green; // Only valid if canProvideRGBComponents is YES
@property (nonatomic, readonly) CGFloat blue; // Only valid if canProvideRGBComponents is YES
@property (nonatomic, readonly) CGFloat white; // Only valid if colorSpaceModel == kCGColorSpaceModelMonochrome
@property (nonatomic, readonly) CGFloat alpha;
@property (nonatomic, readonly) UInt32 rgbHex;
@property (nonatomic, readonly) UInt32 argbHex;

- (NSString *)colorSpaceString;

- (NSArray *)arrayFromRGBAComponents;

- (BOOL)red:(CGFloat *)r green:(CGFloat *)g blue:(CGFloat *)b alpha:(CGFloat *)a;

- (UIColor *)colorByLuminanceMapping;

- (UIColor *)colorByMultiplyingByRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha;
- (UIColor *) colorByAddingRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha;
- (UIColor *) colorByLighteningToRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha;
- (UIColor *) colorByDarkeningToRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha;

- (UIColor *)colorByMultiplyingBy:(CGFloat)f;
- (UIColor *) colorByAdding:(CGFloat)f;
- (UIColor *) colorByLighteningTo:(CGFloat)f;
- (UIColor *) colorByDarkeningTo:(CGFloat)f;

- (UIColor *)colorByMultiplyingByColor:(UIColor *)color;
- (UIColor *) colorByAddingColor:(UIColor *)color;
- (UIColor *) colorByLighteningToColor:(UIColor *)color;
- (UIColor *) colorByDarkeningToColor:(UIColor *)color;

- (NSString *)stringFromColor;
- (NSString *)hexStringFromColor;

+ (UIColor *)randomColor;
+ (UIColor *)colorWithString:(NSString *)stringToConvert;
+ (UIColor *)colorWithRGBHex:(UInt32)hex;
+ (UIColor *)colorWithRGBHex:(UInt32)hex alpha:(float)alpha;
+ (UIColor *)colorWithHexString:(NSString *)stringToConvert;

+ (UIColor *)colorWithName:(NSString *)cssColorName;


/// 主标题颜色
+ (UIColor *)navTitleColor;

/// 副标题颜色
+ (UIColor *)secondTitleColor;

/// 导航栏颜色
+ (UIColor *)navBgColor;

/// 主题色
+ (UIColor *)mainOrangleColor;

/// 主题色20%透明度
+ (UIColor *)mainOrangleColorAlpha:(CGFloat) alpha;

/// 分割线
+ (UIColor *)seplitColor;

/// leftNav被选中颜色
+ (UIColor *)selectedColor;

#pragma mark - Custom color
+ (UIColor *)colorForF3F4F8;

+ (UIColor *)colorForF18D00;

+ (UIColor *)colorFor262626;

+ (UIColor *)colorFor333333;

+ (UIColor *)colorFor666666;

+ (UIColor *)colorForD9DADE;

+ (UIColor *)colorFor808080;

+ (UIColor *)colorForBlack;

+ (UIColor *)colorForWhite;

+ (UIColor *)colorFor4D4D4D;

+ (UIColor *)colorForEBECF0;

+ (UIColor *)colorForFFFBF4;

+ (UIColor *)colorForE6E7EB;

+ (UIColor *)colorForF3A714;

+ (UIColor *)colorForE08300;

+ (UIColor *)colorForDE5949;

+ (UIColor *)colorFor999999;

+ (UIColor *)colorFor404040;

+ (UIColor *)colorFor6D737D;

+ (UIColor *)colorFor47484D;

+ (UIColor *)colorForBFBFBF;

+ (UIColor *)colorForF98335;

+ (UIColor *)colorForDE3E2C;

+ (UIColor *)colorFor48494D;

+ (UIColor *)colorFor343434;

+ (UIColor *)colorForEF8B02;

+ (UIColor *)colorFor737373;

+ (UIColor *)colorForF18C00;

+ (UIColor *)colorForC93B3B;

+ (UIColor *)colorForE6A241;

+ (UIColor *)colorForD54040;

+ (UIColor *)colorForF5F5F5;

+ (UIColor *)colorForDBDBDB;

+ (UIColor *)colorFor5C6167;

+ (UIColor *)colorFor8C8C8C;

+ (UIColor *)colorForE99A4A;

+ (UIColor *)colorFor58B6BE;

+ (UIColor *)colorFor65B182;

+ (UIColor *)colorForCCCCCC;

+ (UIColor *)colorFor1C1C1CC;

+ (UIColor *)colorForAD5B24;

+ (UIColor *)colorFor41868C;

+ (UIColor *)colorFor508C67;

+ (UIColor *)colorFor2B2B2F;

+ (UIColor *)colorForF6A83F;

+ (UIColor *)colorFor50a6ad;

+ (UIColor *)colorFor5ca176;

+ (UIColor *)colorForE6E6E6;

+ (UIColor *)colorFor58BE6A;

+ (UIColor *)colorFor4F94F2;

+ (UIColor *)colorForBFA3A3;

+ (UIColor *)colorFor4C4C4C;

+ (UIColor *)colorForF4F5F8;

+ (UIColor *)colorForDCDEE6;

+ (UIColor *)colorForFCFDFF;

+ (UIColor *)colorForF9F8F6;

+ (UIColor *)colorFor101010;

+ (UIColor *)colorForE2E5F4;

+ (UIColor *)colorFor3E3E3E;
+ (UIColor *)colorForE8EAF1;

+ (UIColor *)colorForF6F6F6;
+ (UIColor *)colorFor414147;
+ (UIColor *)colorFore9ebf2;

#pragma mark - Custom Theme color
/// FFFFFF To 1C1C1C
+ (UIColor *)themeColorForBaseVC;
/// /// ffffff to 2B2B2F
+ (UIColor *)themeColorForOtherBaseVC;
/// #F3F4F8-> #2B2B2F
+ (UIColor *)themeColorForPanneTypeBase;
/// F18D00 -> F18D00
+ (UIColor *)themeColorForPannelTypeSelected;
/// 262626 -> 262626
+ (UIColor *)themeColorForPannelContentBase;
/// #333333 ->#CCCCCC
+ (UIColor *)themeColorForDarkTitle;
/// 4D4D4D -> 4D4D4D
+ (UIColor *)themeColorForDarkMiddleTitle;
/// 666666 -> 666666
+ (UIColor *)themeColorForDarkLightTitle;
/// #999999 -> #808080
+ (UIColor *)themeColorForDarkLowLightTitle;
/// #999999->#404040
+ (UIColor *)themeColorForBorderLine;
/// D9DADE -> D9DADE
+ (UIColor *)themeColorForDividingLine;
/// 808080-> 808080
+ (UIColor *)themeColorForLightGrayTitle;
/// EBECF0 -> EBECF0
+ (UIColor *)themeColorForSectionBack;
/// F3A714 -> F3A714
+ (UIColor *)themeColorForAddEnclosure;
/// E08300-> AD5B24
+ (UIColor *)themeColorForSaveEnclosureBack;
/// DE5949 -> DE5949
+ (UIColor *)themeColorForDeleteBack;
/// White- >black
+ (UIColor *)themeColorForTopBarBack;
/// #58B6BE->#41868C
+ (UIColor *)themeColorForRemoteScanTitle;
/// #65B182->#508C67
+ (UIColor *)themeColorForRemoteDownFileTitle;
/// 262626 -> F5F5F5
+ (UIColor *)themeColorForNavTitle;
/// 8C8C8C -> 666666
+ (UIColor *)themeColorForListTimeColor;
/// 262626 To 999999
+ (UIColor *)themeColorForSelectButSelectedColor;
/// 999999->262626
+ (UIColor *)themeColorForSelectButDefaultColor;
/// E6E6E6->333333
+ (UIColor *)themeColorForHomeLineColor;
/// BFBFBF->666666
+ (UIColor *)themeColorLoginOrTitleColor;
/// BFA3A3->4C4C4C
+ (UIColor *)themeColorLoginPhoneTopLineColor;
/// F5F5F5-> 1C1C1C
+ (UIColor *)themeColorLoginTextFieldBackColor;
/// F98335->AD5B24
+ (UIColor *)themeColorLoginForgetBackColor;
/// F18D00->F18D00
+ (UIColor *)themeColorSDKMainColor;
/// F4F5F8 ->2B2B2F
+ (UIColor *)themeColorPluginAppCellBgColor;
/// DCDEE6 -> 404040
+ (UIColor *)themeColorForDocLineBorderColor;
/// FCFDFF -> 2B2B2F
+ (UIColor *)themeColorForDocGroupBottomColor;
/// F9F8F6 ->1C1C1C
+ (UIColor *)themeColorForTabarColor;
/// E2E5F4->101010
+ (UIColor *)themeColorForDocumentSortLineColor;
/// F3F4F8 -> 1C1C1C
+ (UIColor *)themeColorForGrayMoreBar;

+ (UIColor *)themeColorFromCCCCCCTo4C4C4C;
+ (UIColor *)themeColorFrom4C4C4CTo999999;
+ (UIColor *)themeColorFrom4D4D4DTo999999;
+ (UIColor *)themeColorFromE6E6E6To4D4D4D;
+ (UIColor *)themeColorFrom8C8C8CTo999999;
+ (UIColor *)themeColorFrom333333To999999;
+ (UIColor *)themeColorFrom48494DTo999999;
+ (UIColor *)themeColorFromE8EAF1To333333;
+ (UIColor *)themeColorFromE6E6E6To1C1C1C;
+ (UIColor *)themeColorFromF9F8F6To1C1C1C;
+ (UIColor *)themeColorFromFFFFFFTo1C1C1C;
+ (UIColor *)themeColorFrom8C8C8CTo4D4D4D;
+ (UIColor *)themeColorFrom999999To666666;
+ (UIColor *)themeColorFromF3F4F8To2B2B2F;
+ (UIColor *)themeColorFromDBDBDBTo4D4D4D;
+ (UIColor *)themeColorFrom262626ToCCCCCC;
+ (UIColor *)themeColorFrom4D4D4DTo808080;

+ (UIColor *)themeColorFromF6F6F6To2B2B2F;
+ (UIColor *)themeColorFromWhiteTo414147;
+ (UIColor *)themeColorFromF3A714ToAD5B24;
+ (UIColor *)themeColorFromE9ebf2To333333;
@end

#if SUPPORTS_UNDOCUMENTED_API
// UIColor_Undocumented_Expanded
// Methods which rely on undocumented methods of UIColor
@interface UIColor (UIColor_Undocumented_Expanded)
- (NSString *)fetchStyleString;
- (UIColor *)rgbColor; // Via Poltras
@end
#endif // SUPPORTS_UNDOCUMENTED_API
